package commands

import "project/design/command/recievers"

type FanOnCommand struct {
	*recievers.Fan
}

func CreateFanOnCommand(fan *recievers.Fan) *FanOnCommand {
	return &FanOnCommand{fan}
}

func (foc *FanOnCommand) Execute() {
	foc.Shift(recievers.LOW) //一档一档调
}

func (foc *FanOnCommand) Undo() {
	foc.SpecifiedSpeed(foc.GetPreSpeed())
}
